package com.zy.cat.entity.mall.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.zy.cat.entity.mall.CatGoodsSubsidyHistory;
public interface CatGoodsSubsidyHistoryRepository extends JpaSpecificationExecutor<CatGoodsSubsidyHistory>,  JpaRepository<CatGoodsSubsidyHistory, String>{
 
	/**
	 * 根据订单类型查询订单
	 * @param pid
	 * @param ftype
	 * @param bstatus
	 * @return
	 */
	List<CatGoodsSubsidyHistory> findByPidAndFtypeAndBstatusIn(String pid,int ftype,int... bstatus);
	
	/**
	 * 根据订单类型查询订单数量
	 * @param pid
	 * @param ftype
	 * @param bstatus
	 * @return
	 */
	int countByPidAndFtypeAndBstatusIn(String pid,int ftype,int... bstatus);
}
